﻿using Sustainalytics.ClientDW.DataAccessLayer;
using Sustainalytics.ClientDW.Entities;
using System;
using System.Collections.Generic;

namespace Sustainalytics.GCCS
{
    public class GCPrincipleEventIndicatorManagementManager : IGCPrincipleEventIndicatorManagementManager
    {
        private readonly IClientDWGlobalCompactRepository _gccRepo;


        public GCPrincipleEventIndicatorManagementManager(IClientDWGlobalCompactRepository gccRepo)
        {
            this._gccRepo = gccRepo;
        }

        public List<GCPrincipleEventIndicatorManagement> GetList(Guid principleSummaryId)
        {
            try
            {
                GCCEventSource.Log.GCPrincipleEventIndicatorManagement_GetList(principleSummaryId);

                List<GCPrincipleEventIndicatorManagement> lst = this._gccRepo.GetGCPrincipleEventIndicatorManagementList(principleSummaryId);

                GCCEventSource.Log.GCPrincipleEventIndicatorManagement_GetList_Success(principleSummaryId);

                return lst;
            }
            catch (Exception ex)
            {
                GCCEventSource.Log.GCPrincipleEventIndicatorManagement_GetList_Error(principleSummaryId, ex);
                throw;
            }
        }
    }
}
